<%--
  Created by IntelliJ IDEA.
  User: 花花
  Date: 2021/6/20
  Time: 15:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String path=request.getContextPath();
%>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Welcome！</title>
  </head>
  <style>
    #div1{
      text-align: center;
      width: 150px;
      height: 100px;
    }
    #showname{
      text-align: center;
      background-repeat: no-repeat;
      font-size:50px;
      color: #00ff99;
      display: none;
    }
    #div1:hover #showname {
      display: block;
    }
    #exitBtn{
      background-image: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
      border:0;
      width:75px;
      height:25px;
      color:white;
      border-radius: 20px;
    }
    #resetBtn{
      border:0;
      width:75px;
      height:25px;
      color:white;
      border-radius: 20px;
      background-image: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
    }
    #deleteBtn{
      border:0;
      width:75px;
      height:25px;
      color:white;
      border-radius: 20px;
      background-image: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);
    }
    #editBtn{
      border:0;
      width:75px;
      height:25px;
      color:white;
      border-radius: 20px;
      background-image: linear-gradient(to right, #fa709a 0%, #fee140 100%);
    }
    #showBtn{
      margin-top: 30px;
      text-align: center;
      border:0;
      width: 100px;
      height:50px;
      color:white;
      border-radius: 20px;
      background-image: linear-gradient(to top, #a8edea 0%, #fed6e3 100%);
    }
  </style>
  <body style="width:100%;
  height: 100%;
  margin: 0;
        padding: 0;
        background-image: url(index.jpg);
        background-repeat: no-repeat;">
    <div style="text-align: center" id="div1">
    <h2 id="showname">${user.userName}</h2>
    </div>
    <br>
    <br>
    <div style="text-align: center;">
      <button type="button" id="exitBtn">注销</button>
      <button type="button" id="resetBtn">修改密码</button>
      <button type="button" id="deleteBtn">删除用户</button>
      <button type="button" id="editBtn">编辑用户</button>
      <form action="<%=path%>/show" method="post" id="selectForm">
        <button type="button" id="showBtn">查看用户信息</button>
      </form>
    </div>
    <script src="https://www.luckyclover.top/rain.js"></script>
    <script>Rain({speed:[2,40],hasBounce:true,wind_direction:340,gravity:0.05,maxNum:80,numLevel:5,drop_chance:0.4,cloud:true});</script>
  </body>
  <script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
  <script type="text/javascript">
    $("#exitBtn").click(function(){
      alert("注销成功");
      document.location.href="login.jsp";
    });
    $("#resetBtn").click(function (){
      window.location.href="reset.jsp";
    });
    $("#deleteBtn").click(function (){
      document.location.href="delete.jsp";
    });
    $("#editBtn").click(function(){
      document.location.href="edit.jsp";
    });
    $("#showBtn").click(function(){
      $("#selectForm").submit();
    });
  </script>
</html>
